package com.qms.repast.db;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.qms.repast.entity.resbean.CuisineBean;
import com.qms.repast.entity.resbean.CuisineMenuBean;
import com.qms.repast.entity.resbean.CuisineOrderBean;
import com.qms.repast.entity.resbean.LablesBean;

import com.qms.repast.db.CuisineBeanDao;
import com.qms.repast.db.CuisineMenuBeanDao;
import com.qms.repast.db.CuisineOrderBeanDao;
import com.qms.repast.db.LablesBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig cuisineBeanDaoConfig;
    private final DaoConfig cuisineMenuBeanDaoConfig;
    private final DaoConfig cuisineOrderBeanDaoConfig;
    private final DaoConfig lablesBeanDaoConfig;

    private final CuisineBeanDao cuisineBeanDao;
    private final CuisineMenuBeanDao cuisineMenuBeanDao;
    private final CuisineOrderBeanDao cuisineOrderBeanDao;
    private final LablesBeanDao lablesBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        cuisineBeanDaoConfig = daoConfigMap.get(CuisineBeanDao.class).clone();
        cuisineBeanDaoConfig.initIdentityScope(type);

        cuisineMenuBeanDaoConfig = daoConfigMap.get(CuisineMenuBeanDao.class).clone();
        cuisineMenuBeanDaoConfig.initIdentityScope(type);

        cuisineOrderBeanDaoConfig = daoConfigMap.get(CuisineOrderBeanDao.class).clone();
        cuisineOrderBeanDaoConfig.initIdentityScope(type);

        lablesBeanDaoConfig = daoConfigMap.get(LablesBeanDao.class).clone();
        lablesBeanDaoConfig.initIdentityScope(type);

        cuisineBeanDao = new CuisineBeanDao(cuisineBeanDaoConfig, this);
        cuisineMenuBeanDao = new CuisineMenuBeanDao(cuisineMenuBeanDaoConfig, this);
        cuisineOrderBeanDao = new CuisineOrderBeanDao(cuisineOrderBeanDaoConfig, this);
        lablesBeanDao = new LablesBeanDao(lablesBeanDaoConfig, this);

        registerDao(CuisineBean.class, cuisineBeanDao);
        registerDao(CuisineMenuBean.class, cuisineMenuBeanDao);
        registerDao(CuisineOrderBean.class, cuisineOrderBeanDao);
        registerDao(LablesBean.class, lablesBeanDao);
    }
    
    public void clear() {
        cuisineBeanDaoConfig.clearIdentityScope();
        cuisineMenuBeanDaoConfig.clearIdentityScope();
        cuisineOrderBeanDaoConfig.clearIdentityScope();
        lablesBeanDaoConfig.clearIdentityScope();
    }

    public CuisineBeanDao getCuisineBeanDao() {
        return cuisineBeanDao;
    }

    public CuisineMenuBeanDao getCuisineMenuBeanDao() {
        return cuisineMenuBeanDao;
    }

    public CuisineOrderBeanDao getCuisineOrderBeanDao() {
        return cuisineOrderBeanDao;
    }

    public LablesBeanDao getLablesBeanDao() {
        return lablesBeanDao;
    }

}
